package demo.maven.bean.dao.impl;

import demo.maven.bean.dao.IUserDao;
import demo.maven.bean.domain.User;
import demo.maven.bean.factory.BeanFactory;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * @author peter
 * @date 2021/12/4 上午2:19
 */
@Slf4j
public class UserDao implements IUserDao {

    public static User user = (User) BeanFactory.getBean("user");

    private int i = 1;

    @Override
    public List<User> selectAll() {
        user.setId(1);
        return null;
    }

    public Integer getIbyAdd(Integer addNum) {
        return i += addNum;
    }
}
